// 登录相关接口

import { requestApi } from '@/utils/request'
// 账号密码登录
export function login(data: any) {
    return requestApi({
        url: '/login',
        method: 'post',
        data
    })
}
// 手机号登录
export function loginPhone(data: any) {
    return requestApi({
        url: '/login/cellphone',
        method: 'post',
        data
    })
}
// 手机号登录验证码
export function loginPhoneCode(data: any) {
    return requestApi({
        url: '/login/captcha/sent',
        method: 'post',
        data
    })
}
// 手机号注册
export function loginPhoneRegister(data: any) {
    return requestApi({
        url: '/register/cellphone',
        method: 'post',
        data
    })
}
// 手机号注册验证码
export function loginPhoneRegisterCode(data: any) {
    return requestApi({
        url: '/register/captcha/sent',
        method: 'post',
        data
    })
}
// 修改密码
export function editLoginPassword(data: any) {
    return requestApi({
        url: '/edit/loginpassword',
        method: 'post',
        data
    })
}
// 修改密码手机号验证码
export function editLoginPasswordCode(data: any) {
    return requestApi({
        url: '/edit/phonecaptcha/sent',
        method: 'post',
        data
    })
}
// 修改密码邮箱验证码
export function editLoginPasswordCodeEmail(data: any) {
    return requestApi({
        url: '/edit/emailcaptcha/sent',
        method: 'post',
        data
    })
}
// 退出
// export function logout() {
//     return requestApi({
//         url: '/logout',
//         method: 'post',
//     })
// }
// 注销
export function loginLogout() {
    return requestApi({
        url: '/login/logout',
        method: 'delete',
    })
}
// 注销手机号验证码
export function loginLogoutCode(data: any) {
    return requestApi({
        url: '/logout/captcha/sent',
        method: 'post',
        data
    })
}
// 微信扫码登录
export function loginWeixin(data: any) {
    return requestApi({
        url: '/login/weixin',
        method: 'post',
        data
    })
}
// 第三方验证(图片还原,验证码校验,文字校验,计算校验)
export function loginThird(data: any) {
    return requestApi({
        url: '/login/third',
        method: 'post',
        data
    })
}